import { createStore } from 'redux'
import { persistStore, persistReducer } from 'redux-persist'

import reducer from './reducer'
import storage from 'redux-persist/lib/storage'

var persistedReducer = persistReducer( {key:'redux',storage}, reducer)

//实例化store
var store = createStore(persistedReducer) 

//对store进行持久化处理
var persistor = persistStore( store )

export { store, persistor };

